<template>
  <van-overlay z-index="9999" :show="loadingFlag">
    <van-loading :color="cssstyle.color" :style="cssstyle" vertical>{{
      text
    }}</van-loading>
  </van-overlay>
</template>

<script>
export default {
  props: {
    text: {
      type: String,
      default: () => {
        return "加载中";
      },
    },
    loadingFlag: {
      type: Boolean,
      default: () => {
        return false;
      },
    },
    cssstyle: {
      type: Object,
      default: () => {
        return {
          "margin-top": "200px",
          color: "#1989fa",
          size: "24px",
        };
      },
    },
  },
  data() {
    return {};
  },
};
</script>

<style lang="scss" scoped>
::v-deep {
  .van-overlay {
    z-index: 9999 !important;
  }
}
</style>
